package com.sdx.console.order.service;

import java.util.List;

import com.ibeetl.admin.core.entity.BaseEntity;
import org.beetl.sql.core.engine.PageQuery;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ibeetl.admin.core.util.PlatformException;

import com.sdx.console.order.dao.FinOrderDao;
import com.sdx.console.order.entity.FinOrder;
import com.ibeetl.admin.core.service.BaseService;

/**
 * FinOrder Service
 */

@Service
@Transactional
public class FinOrderService extends BaseService<FinOrder>{

    @Resource
	private FinOrderDao finOrderDao;

    public PageQuery<FinOrder>queryByCondition(PageQuery query){
        PageQuery ret =  finOrderDao.queryByCondition(query);
        queryListAfter(ret.getList());
        return ret;
    }

    public void batchDelFinOrder(List<String> ids){
        try {
            finOrderDao.batchDelFinOrderByIds(ids);
        } catch (Exception e) {
            throw new PlatformException("批量删除FinOrder失败", e);
        }
    }

    public List<BaseEntity> selectOrderType(Integer productType){
        return finOrderDao.selectOrderType(productType);
    }

	public List<FinOrder> all() {
		return finOrderDao.all();
		}

    public List<FinOrder> queryByExoprt(FinOrder condtion) {
        return finOrderDao.queryByExoprt(condtion);
    }
}